<?php
/**
 * Vista subir ficheros a la aplicación.
 * Copia el documento al servidor e introduce un registro en la base de datos
 * para poder trabajar con el.
 *
 * @author Israel Mora e Ismael Garcia
 */
?>
<form enctype="multipart/form-data" id="form_ficheros" method="post" target="uploadT">
    <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
    <p>Título: <input type="text" name="titol"></p>
    <p>Adjuntos: <input type="file" id="file_element"></p>
    <div id="files_list">
        <script>
            var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 1);
            multi_selector.addElement( document.getElementById( 'file_element' ));
        </script>
    </div>
    <p>
        <th><?php echo _("Rol_show"); ?></th>
        <select name="rol_show" id="rol_show" type="select-one" size="<?php echo (count($roles))?>">
    <?php foreach ($roles as $fila) { ?>
            
                <option value="<?php echo($fila['titol']) ?>"><?php echo($fila['titol']) ?></option>
    <?php } ?>
         </select>
    </p>
    <p>
        <th><?php echo _("Rol_edit"); ?></th>
        <select name="rol_edit" id="rol_edit" type="select-one" size="<?php echo (count($roles))?>">
    <?php foreach ($roles as $fila) { ?>
                <option value="<?php echo($fila['titol']) ?>"><?php echo($fila['titol']) ?></option>
    <?php } ?>
         </select>
    </p>
    <p>
        <input type="button" onclick="javascript:SendForm('form_ficheros',
            '<?php echo $script ?> ');
                getData('controladores/control_doc.class.php?&action=list','<?php echo $capa; ?>');return false;" value="Enviar" />
        <input type="submit" value="Cancelar" />
    </p>
</form>

<div id="deb"></div>

<iframe id="uploadT" name="uploadT">nada</iframe>
